﻿using System.ComponentModel.DataAnnotations;
using K9Nano.Share;

namespace K9Nano.Web.Accounts.Dto
{
    public sealed class UserEditInput
    {
        [Required(ErrorMessage = "{0}不能为空")]
        public string Id { get; set; }

        /// <summary>
        /// 姓名
        /// </summary>
        [Display(Name = "姓名")]
        [Required(ErrorMessage = "{0}不能为空")]
        [RegularExpression(@"[\u4e00-\u9fa5a-zA-Z0-9]+",ErrorMessage = "{0}只能是中文、字母或者数字")]
        public string Name { get; set; }

        /// <summary>
        /// 性别
        /// </summary>
        [Display(Name = "性别")]
        public EGenderType Gender { get; set; }
        
        /// <summary>
        /// 头像地址
        /// </summary>
        [Display(Name = "头像地址")]
        public string Avatar { get; set; }
    }
}